package com.v2.k19;


import org.aopalliance.aop.Advice;
import org.springframework.aop.framework.ProxyFactory;

/**
 * 测试AOP1
 * 测试ProxyFactory通过编程创建AOP代理
 * 这个例子有问题
 */
public class Test {

	public static void main(String[] args) {
		ProxyFactory factory = new ProxyFactory();
		factory.setTarget(new UserService());
//		factory.addAdvice(new MyAdvisor());  //这个例子有问题

		UserService userService = (UserService) factory.getProxy();
		userService.testKzx();
	}

}
